<?php $this->layout('layout')?>
<?php $this->start('main')?>

<div class="container" style="width:500px;padding-top: 100px;">

<div class="card">
  <div class="card-header">
    WORKTIME
  </div>
  <div class="card-body">

  <h5 class="card-title">简单、好用、高效</h5>
  <p class="card-text">广泛使用、备受好评的项目管理和问题跟踪工具，提供可定制的工作流程和广泛的集成能力。</p>

<?php if (C\Config_App::isfeishu):?>
<form method="GET" action="https://accounts.feishu.cn/open-apis/authen/v1/authorize">
  <input name="client_id" type="hidden" value="<?= C\Config_App::feishu_client_id ?>" />
  <input name="redirect_uri" type="hidden" value="<?= C\Config_App::feishu_redirect_uri ?>" />
  <input name="state" type="hidden" value="<?= random_int(100000, 999999) ?>" />
  <button type="submit" class="btn btn-primary btn-lg btn-block">飞书授权登录</button>
</form>

<?php else:?>
<form method="POST" action="/index/login">
  <div class="form-group">
    <label for="exampleInputEmail1">账号</label>
    <input name="account" type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="账号">
  </div>
  <div class="form-group">
    <label for="exampleInputPassword1">密码</label>
    <input name="password" type="password" class="form-control" id="exampleInputPassword1" placeholder="密码">
  </div>
  <button type="submit" class="btn btn-primary btn-lg btn-block">登 入</button>
</form>
<?php endif?>


  </div>
</div>

</div>
<?php $this->end()?>
